package com.demo.application.feign;

import com.demo.application.config.FeignConfig;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "application-b", configuration = FeignConfig.class)
public interface ApplicationBClient {

    @RequestMapping(value = "/hello", method = RequestMethod.POST)
    String hello();


    // 根据商品id 减库存数量
    @RequestMapping(value = "/inventoryReduction", method = RequestMethod.POST)
    String inventoryReduction(@RequestParam("commodityId") Long commodityId);
}
